package com.fzy.common.excel.export;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 冯赵杨
 * @desc Excel 导出参数
 * @desc 备注：excel POI 中 row行数从上到下是从0开始计算，cell单元格从左到右也是从0开始计算
 * @date 2016年11月16日
 */
public class ExportParam {

    /**
     * excel导出的名称
     */
    private String excelName;

    /**
     * excel模板文件路径
     */
    private String excelTemplatePath;

    /**
     * 数据库查询出的数据集合
     */
    private List<Map<String, Object>> dataList;

    /**
     * sheet名称
     */
    private String sheetName;

    /**
     * 表头大标题
     */
    private String bigTitle;

    /**
     * 大标题高度
     */
    private short bigTitleHeight = 10;

    /**
     * 每个单元格小标题
     */
    private String[] smallTitle;

    /**
     * 每个单元格小标题高度
     */
    private short smallTitleHeight = 8;

    /**
     * 从第几行开始写入数据,默认第3行
     */
    private int startRow = 2;

    /**
     * 从第几个单元格开始写入数据，默认第1个
     */
    private int startCell = 0;

    /**
     * 数据集合map对应的key值
     */
    private String[] fieldKeys;

    /**
     * 数据字典值转换 codeMap中的key为 fieldValue, codeMap中的value格式如：0=是,1=否
     */
    private Map<String, String> codeMap = new HashMap<>();

    /**
     * 需要增加下拉框的单元格数组
     */
    private int[] addValidationCell;

    /**
     * 增加下拉框的单元格
     */
    private Map<Integer, String> validationDataMap = new HashMap<>();

    /**
     * 针对某key值反射执行Java静态方法
     */
    private Map<String, String> methodMap = new HashMap<>();

    /**
     * 单元格每列的宽度  每列值默认为0
     */
    private int[] colWidths;

    public ExportParam() {

    }

    public ExportParam(String excelName, String sheetName) {
        this.excelName = excelName;
        this.sheetName = sheetName;
    }

    public int[] getColWidths() {
        return colWidths;
    }

    public void setColWidths(int[] colWidths) {
        this.colWidths = colWidths;
    }

    public String getExcelName() {
        return excelName;
    }

    public void setExcelName(String excelName) {
        this.excelName = excelName;
    }

    public String getExcelTemplatePath() {
        return excelTemplatePath;
    }

    public void setExcelTemplatePath(String excelTemplatePath) {
        this.excelTemplatePath = excelTemplatePath;
    }

    public String getSheetName() {
        return sheetName;
    }

    public void setSheetName(String sheetName) {
        this.sheetName = sheetName;
    }

    public String getBigTitle() {
        return bigTitle;
    }

    public void setBigTitle(String bigTitle) {
        this.bigTitle = bigTitle;
    }

    public short getBigTitleHeight() {
        return bigTitleHeight;
    }

    public void setBigTitleHeight(short bigTitleHeight) {
        this.bigTitleHeight = bigTitleHeight;
    }

    public String[] getSmallTitle() {
        return smallTitle;
    }

    public void setSmallTitle(String[] smallTitle) {
        this.smallTitle = smallTitle;
    }

    public short getSmallTitleHeight() {
        return smallTitleHeight;
    }

    public void setSmallTitleHeight(short smallTitleHeight) {
        this.smallTitleHeight = smallTitleHeight;
    }

    public int getStartRow() {
        return startRow;
    }

    public void setStartRow(int startRow) {
        this.startRow = startRow;
    }

    public int getStartCell() {
        return startCell;
    }

    public void setStartCell(int startCell) {
        this.startCell = startCell;
    }

    public String[] getFieldKeys() {
        return fieldKeys;
    }

    public void setFieldKeys(String[] fieldKeys) {
        this.fieldKeys = fieldKeys;
    }

    public Map<String, String> getCodeMap() {
        return codeMap;
    }

    public void setCodeMap(Map<String, String> codeMap) {
        this.codeMap = codeMap;
    }

    public Map<String, String> getMethodMap() {
        return methodMap;
    }

    public void setMethodMap(Map<String, String> methodMap) {
        this.methodMap = methodMap;
    }

    public List<Map<String, Object>> getDataList() {
        return dataList;
    }

    public void setDataList(List<Map<String, Object>> dataList) {
        this.dataList = dataList;
    }

    public int[] getAddValidationCell() {
        return addValidationCell;
    }

    public void setAddValidationCell(int[] addValidationCell) {
        this.addValidationCell = addValidationCell;
    }

    public Map<Integer, String> getValidationDataMap() {
        return validationDataMap;
    }

    public void setValidationDataMap(Map<Integer, String> validationDataMap) {
        this.validationDataMap = validationDataMap;
    }

}
